<template>
  <div class="detail-card" @click="gotoDetail(data, router, axios)">
    <img :src="data.icon" alt="">
    <div>
      <span class="title">
        {{data.name}}
      </span>
    </div>
    <div class="flex" style="padding-top: 0px;">
      <span class="size">{{data.size}}</span>
      <el-rate
        v-model="values"
        disabled
        text-color="#ff9900"
      >
      </el-rate>
    </div>
    <div class="time">
      <span>更新时间：{{data.createTime}}</span>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from "vue-router";
const router = ref(useRouter());
const props = defineProps({
  data: {
    type: Object,
    default: () => {},
  },
});

const values = ref(5)

</script>

<style lang="less" scoped>
.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-card {
  cursor: pointer;
  width: 136px;
  img {
    width: 100%;
    height: 192px;
    border-radius: 8px;
    margin-bottom: 10px;
  }
  .title {
    font-size: 16px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #1D2127;
    line-height: 16px;
  }
  .size {
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #93999E;
    line-height: 12px;
  }
  .time {
    font-size: 12px;
    font-family: GoogleSans-Regular, GoogleSans;
    font-weight: 400;
    color: #93999E;
    line-height: 12px;
  }
  &:hover{
    .title{
      color: @link-color;
    }
    img {
      opacity: 0.6;
    }
  }
}

.el-rate {
  &::v-deep(.el-rate__icon) {
    font-size: 12px;
    margin-right: 0px;
  }
}
</style>